package com.example.eurekacustomer.service;

import com.example.eurekacustomer.service.fallback.OutUrlFeignServiceFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * @Auther: zyb
 * @Date: 2018/11/7 11:22
 * @Description: 以Feign的方式调用外部url
 */
//name：随意定义，为类名即可,url：访问地址，fallback：容错类
@FeignClient(name = "OutUrlFeignService", url = "https://www.baidu.com/", fallback = OutUrlFeignServiceFallback.class)
public interface OutUrlFeignService {

    @GetMapping()
    String index();
}
